Skip to content

736: Changed discord message to have leaderboard ID#733

Open
Arshadul-Monir wants to merge 5 commits intomainfrom
736
Open

736: Changed discord message to have leaderboard ID#733
Arshadul-Monir wants to merge 5 commits intomainfrom
736

Conversation

@Arshadul-Monir
Copy link
Collaborator

@Arshadul-Monir Arshadul-Monir commented Feb 4, 2026

736

Description of changes

Added the leaderboard ID to the url message + replaced the hardcoded prod url with ServerUrlUtils url

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

Dev

Screenshot 2026-02-04 at 11 42 15 AM image

Staging

image image

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Available PR Commands

  • /ai - Triggers all AI review commands at once
  • /review - AI review of the PR changes
  • /describe - AI-powered description of the PR
  • /improve - AI-powered suggestions
  • /deploy - Deploy to staging

See: https://github.com/tahminator/codebloom/wiki/CI-Commands

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Title

736: Changed discord message to have leaderboard ID


PR Type

Bug fix


Description

  • Include leaderboardId in Discord URLs

  • Update completed and weekly message templates

  • Pass currentLeaderboard.getId() to formatter


Diagram Walkthrough

flowchart LR
  DCM["DiscordClubManager.java"]
  Completed["sendLeaderboardCompletedDiscordMessage"]
  Weekly["sendWeeklyLeaderboardUpdateDiscordMessage"]
  URL["/leaderboard/{leaderboardId}?{tag}=true"]

  DCM -- updates --> Completed
  DCM -- updates --> Weekly
  Completed -- formats link --> URL
  Weekly -- formats link --> URL
Loading

File Walkthrough

Relevant files
Bug fix
DiscordClubManager.java
Include leaderboardId in Discord leaderboard URLs               

src/main/java/org/patinanetwork/codebloom/common/components/DiscordClubManager.java

  • Add leaderboardId to leaderboard URL path.
  • Update completed message link to /leaderboard/%s.
  • Update weekly update link to /leaderboard/%s.
  • Inject currentLeaderboard.getId() into formatter args.
+4/-2     

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Hardcoded URL

The leaderboard link still hardcodes 'https://codebloom.patinanetwork.org'. For environment flexibility, construct the link using 'serverUrlUtils.getUrl()' (e.g., '%s/leaderboard/%s?%s=true') so dev/staging/prod all receive correct links. Applies to both the "completed" and "weekly update" messages.

View the full leaderboard for %s users at https://codebloom.patinanetwork.org/leaderboard/%s?%s=true

Happy LeetCoding,
Possible NPE

'currentLeaderboard.getId()' is used without a null-safety guard. Ensure 'currentLeaderboard' is always present when sending these messages or guard against null to avoid a runtime NPE.

currentLeaderboard.getId(),
club.getTag().name().toLowerCase(),

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to add leaderboard IDs to Discord message URLs and replace hardcoded production URLs with dynamic URLs from ServerUrlUtils. However, the implementation is incomplete - while the leaderboard ID parameter was added, the hardcoded production URL was not replaced with the dynamic URL as stated in the PR description.

Changes:

  • Added leaderboard ID as a path parameter to Discord message URLs
  • Added new format placeholders and corresponding parameters for leaderboard IDs in both completion and weekly update messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Arshadul-Monir
Copy link
Collaborator Author

/deploy

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

The command to deploy to staging for the commit 9842ef5 has been triggered. View action run

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Staging deployment succeeded for commit 9842ef5

View run

@Arshadul-Monir
Copy link
Collaborator Author

/deploy

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

The command to deploy to staging for the commit 706567b has been triggered. View action run

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Staging deployment succeeded for commit 706567b

View run

@tahminator
Copy link
Owner

/copy

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Database copy command completed successfully!

@Arshadul-Monir Arshadul-Monir force-pushed the 736 branch 2 times, most recently from 04672c8 to 8bc0ff2 Compare February 6, 2026 04:22
@Arshadul-Monir
Copy link
Collaborator Author

/deploy

1 similar comment
@Arshadul-Monir
Copy link
Collaborator Author

/deploy

@Arshadul-Monir
Copy link
Collaborator Author

/deploy

1 similar comment
@Arshadul-Monir
Copy link
Collaborator Author

/deploy

@tahminator
Copy link
Owner

/copy

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

Database copy command completed successfully!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants